package com.xusl.learning.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.Date;

/**
 * @Author: xusl
 * @Date: 2021/8/10 11:05 下午
 */
@Controller
@RequestMapping("demo")
public class SimpleController {


    @RequestMapping("handle")
    public Object handler() {

        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("time", new Date());

        modelAndView.setViewName("index");

        return modelAndView;
    }

}
